package com.heima.admin.controller;

import com.heima.model.common.dtos.PageResponseResult;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.dtos.WmNewsReviewDto;
import com.heima.admin.service.ReviewScanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/admin/api/v1/news")
public class ReviewScanCotroller {

    @Autowired
    private ReviewScanService reviewScanService;

    @PostMapping("/list_vo")
    public PageResponseResult listVoReview(@RequestBody WmNewsReviewDto reviewDto){
        return reviewScanService.listVoReview(reviewDto);
    }

    @GetMapping("/one_vo/{id}")
    public ResponseResult WmNewById(@PathVariable("id") Integer id){
        return reviewScanService.WmNewById(id);
    }

    @PostMapping("/auth_fail")
    public ResponseResult authFail(@RequestBody WmNewsReviewDto reviewDto){
        return reviewScanService.authFail(reviewDto);
    }

    @PostMapping("/auth_pass")
    public ResponseResult authPass(@RequestBody WmNewsReviewDto reviewDto){
        return reviewScanService.authPass(reviewDto);
    }
}
